﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditUser.aspx.cs" Inherits="Admin_EditUser" %>

<%@ Register Src="adminfoot.ascx" TagName="adminfoot" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
        <link rel="stylesheet" href="imgs/admin.css" type="text/css" media="all" />
    <script type="text/javascript" src="../DotNet_net/js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../DotNet_net/js/jquery.form.js"></script>
</head>
<body onload="$('#loading').hide()">  
<div class="container" id="cpcontainer">
<div id="loading" style="display:block">   
    <div class="loading-indicator">   
        页面正在加载中...   
    </div>   
</div>  
<form name="addform" id="addformAjax"  method="post">
<table class="tb">
<tr class="thead"><th colspan="2">
    添加产品数据(<font color='red'>＊</font>为必填,其它选填)</th></tr>	
	<tr> 
       
		<td height="22" width="14%" align="right">
            用户账号(adminUser)：</td>
		<td><input name="adminUser" id="adminUser" type="text" size="30" value="" runat="server">&nbsp;<font color='red'>＊<input
                id="uid_hid" runat="server" type="hidden" />
            <input id="pwd_hid" runat="server" type="hidden" /></font><span id="m_name_ok"></span></td>
           
  </tr>
	<tr>
	  <td align="right" style="height: 31px">
          用户密码(adminPwd)：</td>
	  <td style="height: 31px"><input type="password" id="adminPwd"  name="adminPwd" size="30" runat="server"/>&nbsp;<font color='red'>＊如果不修改则为空！</font><span id="Span1"></span></td>
	</tr>
	<tr><td colspan='2'>&nbsp;<img src='imgs/btn_add.gif' class='pointer' align='absmiddle' onclick="$('#seo').stop().toggle()"/>&nbsp;&nbsp;<font color="red">用户其他信息(包括tel，qq，备注)</font></td></tr>
	<tr><td colspan='2' id="seotd">
	<table id="seo" width="100%"  style="display:none;">
	<tr>
	  <td align="right" width="14%" style="height: 31px">
          用户姓名(adminName)：</td>
	  <td style="height: 31px"><input id="adminName" name="adminName" size="23" runat="server"   />&nbsp;<select id="sex" name="sex" runat="server">
	  <option value="男" selected="selected">男</option>
	  <option value="女">女</option>
	  <option value="保密">保密</option>
	  </select> </td>
	</tr>
	<tr>
	  <td align="right" style="height: 31px">  用户邮箱(adminEmail)：</td>
	  <td style="height: 31px"><input type="text" name="adminEmail" id="adminEmail" maxlength="9" runat="server" /></td>
	</tr>
    <tr>
        <td align="right" style="width:14%">
            用户电话（Tel）：</td>
        <td>
            <input id="Tel" type="text"  name="Tel" runat="server"/></td>
    </tr>
    <tr>
        <td align="right" style="width:14%">
            用户QQ：</td>
        <td>
            <input id="qq" type="text" name="qq" runat="server" /></td>
    </tr>
    <tr>
        <td align="right" style="width:14%">
            用户备注(adminMark)：</td>
        <td>
            <input id="adminMark" type="text" name="adminMark" runat="server"/></td>
    </tr>
    </table></td></tr>
	 <tr>
   <td style="height: 27px"></td> <td class="forumRow" style="height: 27px" ><input type="button" class="btn" value="确认保存" name="Submit" id="tijiao"  />&nbsp;<input type="reset" class="btn" value="清 除"  onclick="">&nbsp;<input type=button class="btn" value="返　回" onClick="javascript:location.href='adminUser.aspx';"/>
       </td>
  </tr>
</table>

</form>

</div>
    <uc1:adminfoot ID="Adminfoot1" runat="server" />
<script type="text/javascript">
$(document).ready(function(){
    var options = { 
        beforeSubmit:  showRequest,  // pre-submit callback 
        success:       showResponse,  // post-submit callback 
        // other available options: 
         url:       "?state=update&uid="+$("#uid_hid").attr("value")+"&pwd="+$("#pwd_hid").attr("value"),         // override for form's 'action' attribute 
       // type:        'post'        // 'get' or 'post', override for form's 'method' attribute 
        //dataType:  null        // 'xml', 'script', or 'json' (expected server response type) 
        clearForm: true,        // clear all form fields after successful submit 
        resetForm: true        // reset the form after successful submit 
 
        // $.ajax options can be used here too, for example: 
        //timeout:   3000 
    }; 
    $('#tijiao').click(function(){    
         $("#loading").show();
         $('#addformAjax').ajaxSubmit(options);         
         return false;
    });
})
function showResponse(msg){ 
    if(msg=="1")
    {
        alert("修改成功!!!");
        $("#loading").hide();
        location.href="adminUser.aspx";
    }
    else
    {
        alert(msg);
        $("#loading").hide();
    }
} 
function showRequest(formData, jqForm, options) 
{ 		
    return true; 
} 

</script>
</body>
</html>
